/*
 	Software Author: Mike Moore
 	Vectrics Flashrecruit
 	Open source job board and applicant tracking system.  Built with enterprise Java.
 	GPL License applies to this source code.
 */
package org.vectrics.recruiter.struts;

import org.apache.log4j.*;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;;

public class LogOffAction extends Action {
    private static Category log = Category.getInstance(LogOffAction.class);

	public ActionForward execute(ActionMapping mapping,
				 ActionForm form,
				 HttpServletRequest request,
				 HttpServletResponse response)	throws Exception {
		log.info("execute() called.");
		HttpSession session = request.getSession();
		if (session != null) {
			session.invalidate();
		}
		return (mapping.findForward("success"));
	}


}
